{{ header }}
<div id="account-wishlist" class="container wishlist-container">
	{#{{ include(helper.template('_partial/breadcrumb')) }}#}
	{% if success %}
        <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
            <button type="button" class="close" data-dismiss="alert">&times;</button>
        </div>
	{% endif %}
    <div class="wish-lists">
		{#{{ column_left }}#}
		{#{% if column_left and column_right %}#}
			{#{% set class = 'col-sm-6' %}#}
		{#{% elseif column_left or column_right %}#}
			{#{% set class = 'col-sm-9' %}#}
		{#{% else %}#}
			{#{% set class = 'col-sm-12' %}#}
		{#{% endif %}#}
		<div class="content">
			<h2>{{ heading_title }}</h2>
			{% if products %}
				<div class="product-lists">
					{% for product in products %}
						<div class="wish-product">
							<div class="product-image text-center" title="{{ product.name }}">
								<a href="{{ product.href }}">
									<img src="{{ product.thumb }}" alt="">
								</a>
							</div>
							<div class="product-title" title="{{ product.name }}">
								<a href="{{ product.href }}">{{ product.name }}</a>
							</div>
							<div class="price-block">
								{% if not product.special %}
									<span class="new-price">{{ product.price }}</span>
								{% else %}
								<span class="new-price">{{ product.special }}</span>
								<span class="old-price">{{ product.price }}</span>
								{% endif %}
							</div>
							<div class="operation-block text-right">
								<a href="{{ product.remove }}"><i class="fa fa-trash"></i></a>
							</div>
						</div>
					{% endfor %}
				</div>
				<div class="text-center">{{ pagination }}</div>
			{% else %}
				<div class="no-items">
					<img src="catalog/view/theme/{{ helper.config('theme_default_directory') }}/image/icon/icon_no_wish.svg" class="img-responsive">
					<span>{{ text_no_results }}</span>
				</div>
			{% endif %}
		</div>
    </div>
</div>
{{ footer }}
<script type="text/javascript">
    jQuery( document ).ready(function($){
        // 监听点击事件，调用弹框layer
        $('.operation-block > a').click(function(e){
            e.preventDefault();

            var remove_url = this.href;
			var content = '{{ confirm_delete }}';
            var btn_text = '{{ confirm_btn }}';

            var wish_delete_index = layer.open({
                skin: 'jd-layui',
                title: ' ',
                btnAlign: 'c',
                shadeClose: true,
                shade: [0.6,'#000'],
                content: content,
                btn: [btn_text],
                yes: function() {
                    window.location.href = remove_url;
                }
            });
            // 设置中间内容居中
            layer.style(wish_delete_index,{
				textAlign: 'center'
			});
		})
	});
</script>
